<style tyle="text/css">
    .modal-lg {
      width: 70%;
    }
    
  </style>
  <div class="modal-header">
    <h4 class="modal-title">旅游信息发布</h4>
  </div>
  <div class="modal-body">
  
    <form name="form" class="form-horizontal form-validation ng-pristine ng-valid ng-valid-required">
      <div class="form-group">
        <label class="col-lg-3 control-label">消息标题:</label>
        <div class="col-lg-6">
            <input type="text" class="form-control" ng-model="info.title" ng-if="!info.openstate" placeholder="标题">
        </div>
        <div class="col-lg-6" >
            <input type="text" class="form-control" ng-model="info.title" ng-if="info.openstate" readonly>
        </div>
    </div>
        <div class="form-group" ng-if="!info.seeopenstate">
            <label for="inputDate" class="col-sm-3 control-label">消息类别</label>
            <div class="col-md-6"  ng-if="!info.openstate">
                    <ui-select ng-model="info.msgType" theme="bootstrap" ng-change="findtypeSlist()">
							<ui-select-match placeholder="旅游法规信息类别">{{$select.selected.label}}</ui-select-match>
							<ui-select-choices repeat="item.value as item in dictbytypelist | filter: $select.search">
								<span ng-bind-html="item.label | highlight: $select.search"></span>
							</ui-select-choices>
                    </ui-select>
                        

                <!-- <select class="form-control" ng-model="info.msgType" >
                    <option value="">请选择</option>
                    <option value="1">系统消息</option>
                    <option value="2">企业消息</option>
                    <option value="3">旅游委消息</option>
                    <option value="4">私信</option>
                    <option value="5">公告</option>
                    
                </select> -->
            </div>
            <div class="col-md-6"  ng-if="info.openstate" readonly>
                <input type="text" class="form-control" ng-model="info.msgTypeName" ng-if="info.openstate" readonly>
            </div>
         </div>

         <div class="form-group" ng-if="!info.seeopenstate  && info.msgType == 'notice'">
                <label for="inputDate" class="col-sm-3 control-label">旅游法规信息子类别</label>
                <div class="col-md-6"  ng-if="!info.openstate">
                        <ui-select ng-model="info.msgTypeSon" theme="bootstrap">
                                <ui-select-match placeholder="旅游法规信息子类别">{{$select.selected.label}}</ui-select-match>
                                <ui-select-choices repeat="item.value as item in dictbytypeSlist | filter: $select.ssearch">
                                    <span ng-bind-html="item.label | highlight: $select.ssearch"></span>
                                </ui-select-choices>
                        </ui-select>
                </div>
                <div class="col-md-6"  ng-if="info.openstate" readonly>
                    <input type="text" class="form-control" ng-model="info.msgTypeSonName" ng-if="info.openstate" readonly>
                </div>
             </div>

         <div class="form-group" ng-if="!info.seeopenstate">
            <label for="inputDate" class="col-sm-3 control-label">对象范围</label>
            <div class="col-md-6"  ng-if="!info.openstate">
                <select class="form-control" ng-model="info.companyType" >
                    <option value="">请选择</option>
                    <option value="0">机构</option>
                    <option value="1">账号</option>
                </select>
            </div>
            <div class="col-md-6"  ng-if="info.openstate" readonly>
                <input type="text" class="form-control" ng-model="info.companyTypeName" ng-if="info.openstate" readonly>
            </div>
         </div>
         <div class="form-group">
            <label class="col-xs-3 control-label">消息内容</label>
            <div class="col-xs-6" ng-if="!info.openstate">
                <div class="ueditor" ng-model="info.info"></div>
            </div>
            <div class="col-md-6"  ng-if="info.openstate" ng-model="info.info " readonly>
                <span ng-bind-html="info.info"></span>
            </div>
        </div>
        <!-- <div class="form-group">
            <label class="col-xs-3 control-label">收信机构</label>
            <div class="col-xs-6" ng-if="!info.openstate">
                <input type="text" class="form-control" ng-model="info.company_codes" ng-if="!info.openstate" placeholder="收信机构">
            </div>
            <div class="col-md-6"  ng-if="info.openstate" readonly>
                <input type="text" class="form-control" ng-model="info.company_codes" ng-if="!info.openstate" placeholder="收信机构">
            </div>
        </div> -->
        <div class="form-group"  ng-if="!info.openstate  && !info.seeopenstate">
            <label class="col-lg-3 control-label">收信机构</label>
              <div  class="col-lg-3"> 
                  <input type="text" class="form-control" ng-model="info.company_code" placeholder="收信机构">
              </div>
              <div class="col-lg-3">
                  <button class="btn btn-info" ng-click="add()">添加</button> 
              </div>
          </div>
         
            <div class="form-group"  ng-if="info.company_codes.length > 0 && !info.seeopenstate">
                    <label class="col-lg-3 control-label" ng-if="info.openstate">收信机构</label>
                    <label class="col-lg-3 control-label" ng-if="!info.openstate"></label>
                <div style="padding-right: 20px; padding-left: 20px; padding-bottom: 5px; float: left;"  ng-repeat="companycode in info.company_codes">
                    <button class="btn btn-sm btn-info ">{{companycode.company_code}}
                      <i class="glyphicon glyphicon-remove" ng-click="remove($index)"  ng-if="!info.openstate"></i>
                    </button>
                  </div>
            </div>
     
 
    </form>
  
  </div>
  
  <div class="modal-footer">
      <button class="btn btn-success" type="button" ng-if="!info.openstate" ng-click="saveonly()">保存</button>
      <button class="btn btn-success" type="button" ng-if="!info.openstate" ng-click="save()">保存并发送</button>
      <button class="btn btn-danger" type="button" ng-click="cancel()">取消</button>
  </div>
  